// pages/order/logistics/details/index.js
var call = require("../../../../utils/request.js");
Page({

  /**
   * 页面的初始数据
   */
  data: {
    pageStatus: false,
    logisticsData: {},
    userInfo: {}, // 用户数据
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({userInfo: wx.getStorageSync('userInfo')})
    //this.selectComponent('#notice').webSocket() // 触发公告
    this.getListData(options.id)  // 获取数据
  },
  getListData(id){
    call.httpData('GET','/api/order/logisticsDetails', { id },
    res => {
      console.log(res,'查看物流')
      if(res.code == 1){
        this.setData({ logisticsData: res.data })
      }else{
        wx.showToast({ icon: 'none',title: res.msg });
      }
      this.setData({ pageStatus: true })
    },function (err) {
      console.log(err)
    })
  },
  
})